/*
 * SpryAccordionModel.java
 *
 * Created on September 8, 2007, 5:18 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package jmaki.models;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

/**
 *
 * @author kabad
 */
public class SpryAccordionModel{
    JSONArray listaSpryAccordionItem;
    /** Creates a new instance of SpryAccordionModel */
    public SpryAccordionModel() {
        listaSpryAccordionItem=new JSONArray();
        
    }
    public void put(SpryAccordionItem spryAccordionItem){
        listaSpryAccordionItem.put(spryAccordionItem.toJSONObject());
    }

    public String toString() {
        JSONObject items=new JSONObject();
        try {
            items.put("items",listaSpryAccordionItem);
        } catch (JSONException ex) {
            ex.printStackTrace();
        }
        return items.toString();
    }

}
